<%@page import="java.util.List,com.crm.entity.StockEntity" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml"><!-- InstanceBegin template="/Templates/temp.dwt" codeOutsideHTMLIsLocked="false" -->
<head>
<link href="<%=application.getContextPath()%>/css/css-crm.css" rel="stylesheet" type="text/css" />
<link rel="stylesheet" href="<%=application.getContextPath()%>/css/datatable.css"/>
<script type="text/javascript" src="<%=application.getContextPath()%>/js/jquery-1.6.min.js"></script>	
<script language="JavaScript" src="<%=application.getContextPath()%>/js/gen_validatorv4.js"
    type="text/javascript" ></script>
<script type="text/javascript" src="<%=application.getContextPath()%>/js/jquery.validate.js"></script>	
<script type="text/javascript" src="<%=application.getContextPath()%>/js/jquery.validate.min.js"></script>
<script type="text/javascript" src="<%=application.getContextPath()%>/js/jquery-1.7.2.min.js"></script>
<script language="javaScript" src="<%=application.getContextPath()%>/js/jquery-ui-1.8.20.custom.min.js"></script>
<script type="text/javascript" src="<%=application.getContextPath()%>/js/jquery-ui-1.8.17.custom.min.js"></script>
<script type="text/javascript" src="<%=application.getContextPath()%>/js/colResizable-1.3.min.js"></script>
 <script type="text/javascript" language="javascript" src="<%=application.getContextPath()%>/js/jquery.dataTables.nightly.js"></script>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
<script  type="text/javascript">
$(document).ready(function() {
		$('#serchtab').dataTable();
	} );
</script>
</head>

<body>
<div id="main">
  <%@ include file="common/header.jsp" %>
  <%@ include file="common/submenu.jsp" %>
  <div id="content"><!-- InstanceBeginEditable name="EditRegion3" -->
  <form id="form1" name="form1" method="post" action="<%=application.getContextPath() %>/stock/show.do">
    <div id="work-area2">
      <div class="heading2">Inventory</div>
      <div class="boxIFS">
          <table width="100%" border="0" cellspacing="0" cellpadding="0">
            <tr>
              <td width="38%" align="right" valign="middle"><label></label></td>
              <td width="2%" align="right" valign="middle">&nbsp;</td>
              <td width="60%" align="right" valign="middle">&nbsp;</td>
            </tr>
            <tr>
              <td align="right" valign="top">&nbsp;</td>
              <td align="left" valign="middle">&nbsp;</td>
              <td align="left" valign="middle">&nbsp;</td>
            </tr>
            <tr>
              <td align="right" valign="middle"><label>Part Number</label>              <label>
                <input name="part" type="text" class="form" id="partId" />
              </label></td>
              <td align="right" valign="middle"><div class="button">Show</div></td>
              <td align="left" valign="middle">&nbsp;</td>
            </tr>
            <tr>
              <td align="right" valign="middle">&nbsp;</td>
              <td align="right" valign="middle">&nbsp;</td>
              <td align="right" valign="middle">&nbsp;</td>
            </tr>
            <tr>
              <td align="right" valign="middle">&nbsp;</td>
              <td align="right" valign="middle">&nbsp;</td>
              <td align="right" valign="middle">&nbsp;</td>
            </tr>
          </table>
      </div>
      </div>
      </form>
	  
	  <div class="boxtable">
	  <%-- <form action="<%=application.getContextPath() %>/stock/update.do" method="post"> --%>
	  <div id="demo">
        <table width="100%" border="0"  id="serchtab" cellpadding="4" cellspacing="1" bgcolor="#C5E4EB">
          <thead>        
          <tr>
            <th width="29" align="center" valign="middle" background="<%=application.getContextPath() %>/images/table-box.jpg"   style="background-repeat:repeat-xbgcolor="#FFFFFF">S.No</th>
            <th width="91" align="center" valign="middle" background="<%=application.getContextPath() %>/images/table-box.jpg"   style="background-repeat:repeat-xbgcolor="#FFFFFF"> Part Number</th>
            <th width="86" align="center" valign="middle" background="<%=application.getContextPath() %>/images/table-box.jpg"  style="background-repeat:repeat-x bgcolor="#FFFFFF">Description</th>
            <th width="93" align="center" valign="middle" background="<%=application.getContextPath() %>/images/table-box.jpg"   style="background-repeat:repeat-xbgcolor="#FFFFFF">Remaining Qty</th>
            <th width="87" align="center" valign="middle" background="<%=application.getContextPath() %>/images/table-box.jpg"   style="background-repeat:repeat-xbgcolor="#FFFFFF">Purchase Date</th>
            <th width="67" align="center" valign="middle" background="<%=application.getContextPath() %>/images/table-box.jpg"   style="background-repeat:repeat-xbgcolor="#FFFFFF">Last Used</th>
            <th width="84" align="center" valign="middle" background="<%=application.getContextPath() %>/images/table-box.jpg"   style="background-repeat:repeat-xbgcolor="#FFFFFF">Procured Qty</th>
            <th width="69" align="center" valign="middle" background="<%=application.getContextPath() %>/images/table-box.jpg"   style="background-repeat:repeat-xbgcolor="#FFFFFF">Sold Qty</th>
          </tr>
           </thead>
          <tbody>
          <%
          	List<StockEntity> lse=(List<StockEntity>)request.getAttribute("stockList");
          if(lse!=null){
        	  for(int i=0;i<lse.size();i++){
          %>
          <tr>
          <input name="id<%=i+1%>" type="hidden" size="5" value="<%=lse.get(i).getId()%>"/>
            <td align="center" bgcolor="#FFFFFF"><input name="sno<%=i+1%>" type="text" size="5" value="<%=i+1%>"/></td>
            <td align="left" valign="top" bgcolor="#FFFFFF"><input name="partNumber<%=i+1%>" type="text" size="5" value="<%=lse.get(i).getPartNo().getPrtnum()%>"/></td>
            <td align="left" valign="top" bgcolor="#FFFFFF"><input name="desc<%=i+1%>" type="text" size="5" value="<%=lse.get(i).getDescription()%>"/></td>
            <td align="left" valign="top" bgcolor="#FFFFFF"><input name="remainingQty<%=i+1%>" type="text" size="5" value="<%=lse.get(i).getQuantity()%>"/></td>
            <td align="left" valign="top" bgcolor="#FFFFFF"><input name="purcDate<%=i+1%>" type="text" size="5" value="<%=lse.get(i).getPurchaseDate()%>"/></td>
            <td align="left" valign="top" bgcolor="#FFFFFF"><input name="lastUsed<%=i+1%>" type="text" size="5" value="<%=lse.get(i).getLastUsedDate()%>"/></td>
            <td align="left" valign="top" bgcolor="#FFFFFF"><input name="procQty<%=i+1%>" type="text" size="5" value="<%=lse.get(i).getProcuredQuantity()%>"/></td>
            <td align="left" valign="top" bgcolor="#FFFFFF"><input name="soldQty<%=i+1%>" type="text" size="5" value="<%=lse.get(i).getSoldQuantity()%>"/></td>
          </tr>
          <%
    	  
        	  }
          }
          %>
          </tbody>
        </table>
        </div>
         <!-- <div class="box2">
	    	<div class="buttton-main">
	    	<div class="button">Close</div>
	    	<input type="submit" class="button" value="Update"/>
	    </div>
	  </div> -->
       <!--  </form> -->
    </div>
       <table style="height:200px; width:910px;" ><tr><td></td></tr></table>
      </div>
      <div id="footer"></div>  
</div>
</body>
<!-- InstanceEnd --></html>